import React, {Component} from 'react';
import Grid from 'react-bootstrap/lib/Grid';
import ButtonToolbar from 'react-bootstrap/lib/ButtonToolbar';
import ButtonGroup from 'react-bootstrap/lib/ButtonGroup';
import Button from 'react-bootstrap/lib/Button';
import Glyphicon from 'react-bootstrap/lib/Glyphicon';

export default class ListComponent extends Component {
  render() {
    var items = this.props.items;
    var list = items.map((item, index) => <li key={index}>{item}</li>);

    return (
      <div>
        <h2>Data:</h2>
        <ul>
          {list}
        </ul>
        <button onClick={this.props.fetchSimple}>
          Fetch
        </button>

      </div>
    );
  }
}
